package com.hs.srm.admin.modules.notice.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.hs.srm.base.common.base.CloneableEntity;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 通知定义实体类
 *
 * @author ych
 * @since 2020-04-02 10:15:44
 */
@Setter
@Getter
@TableName("notice_definition_manage")
public class NoticeDefinitionManageEntity implements Serializable, CloneableEntity<NoticeDefinitionManageEntity> {
    private static final long serialVersionUID = -23423678113148800L;

    /**
     * 通知管理id
     */
    @TableId(value = "pk_id", type = IdType.UUID)
    @TableField("pk_id")
    private String pkId;

    /**
     * 通知类型
     */
    @TableField("kind")
    private String kind;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 创建时间
     */
    @JSONField(format = "yyyy-MM-dd")
    @TableField("create_date")
    private Date createDate;

    @TableField(exist = false)
    private List<Integer> roleList;

    @Override
    public NoticeDefinitionManageEntity clone() {
        try {
            return (NoticeDefinitionManageEntity) super.clone();
        } catch (CloneNotSupportedException ex) {
            ex.printStackTrace();
        }
        return null;
    }
}